package com.yhyvr.pojo.order;

import com.lz.mybatis.jdbc.auto.model.BoOrderLog;
import com.lz.mybatis.jdbc.auto.model.BoOrderOperLog;
import com.lz.mybatis.jdbc.auto.model.BoOrderRefundLog;
import com.lz.tool.UUIDTool;
import com.yhyvr.constant.ProxyOrderOperConstant;

import java.util.Date;

/**
 * Created by tech6 on 2016/9/1.
 */
public class OrderLogMessage {

    public static String getSubmitMessage(){
        return "提交订单";
    }

    public static  String getPayMessage(){
        return "支付成功";
    }
    public static  String getReciveMoney(){
        return  "系统已经收到付款";
    }
    public static String getOrderConfirm(){
        return "订单已经确认";
    }

    public static String getOrderTakeOver(){
        return "订单已签收";
    }
    public static String getOrderTakeOverBySys(){
        return "由于长时间不签收，系统自动确认收货";
    }
    public static String getOrderNoticePeople(){
        return "通知快递人员收货";
    }

    public static String getOrderRecive(String company,String number){
        return "已经发货，快递公司:"+company+",快递单号:"+number;
    }
    public static String getOrderRecive(String remark){
        return "已经发货，"+remark;
    }
    public static String getOrderSuccess(){
        return "订单已经确认收货";
    }
    public static String getRefundGoodsSuccess(){
        return "订单退货完成";
    }
    public static String getCancel(){
        return "订单已经取消";
    }
    public static String getCancelGoods(){
        return "退货申请提交成功，等待审核！";
    }

    public static String getCancelRun(){
        return "订单正在取消";
    }

    public static BoOrderLog buildBoOrderLog(String orderId, Date time,String message){
        BoOrderLog boOrderLog = new BoOrderLog();
        boOrderLog.setOrderId(orderId);
        boOrderLog.setOrderLogCreateTime(time);
        boOrderLog.setOrderLogId(UUIDTool.getUUID());
        boOrderLog.setOrderLogMessage(message);
        return boOrderLog;
    }

    public static BoOrderRefundLog buildBoOrderRefundLog(String orderId, Date time, String message,int type){
        BoOrderRefundLog boOrderRefundLog = new BoOrderRefundLog();
        boOrderRefundLog.setOrderRefundId(orderId);
        boOrderRefundLog.setOrderLogCreateTime(time);
        boOrderRefundLog.setOrderLogId(UUIDTool.getUUID());
        boOrderRefundLog.setOrderLogMessage(message);
        boOrderRefundLog.setOrderRefundType(type);
        return boOrderRefundLog;
    }

    public static BoOrderOperLog buildBoOrdeOperrLog(ProxyOrderOperConstant proxyOrderOperConstant, String orderId,int userId){
        BoOrderOperLog boOrderLog = new BoOrderOperLog();
        boOrderLog.setOperDescription(proxyOrderOperConstant.getMessage());
        boOrderLog.setOperType(proxyOrderOperConstant.getType());
        boOrderLog.setOrderId(orderId);
        boOrderLog.setOrderOperId(UUIDTool.getUUID());
        boOrderLog.setCreateTime(new Date());
        boOrderLog.setSysUserId(userId);
        return boOrderLog;
    }
}
